<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>demo</title>
<script src="https://cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
<link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link href="https://cdn.bootcss.com/bootstrap-table/1.11.1/bootstrap-table.min.css" rel="stylesheet">
<script src="https://cdn.bootcss.com/bootstrap-table/1.11.1/bootstrap-table.min.js"></script>
<script src="https://cdn.bootcss.com/bootstrap-table/1.11.0/extensions/cookie/bootstrap-table-cookie.js"></script>
<!—如果想使用中文版也可以引入以下语言包 -->
<script src="https://cdn.bootcss.com/bootstrap-table/1.11.1/locale/bootstrap-table-zh-CN.min.js"></script>

</head>
<body>
<div class='container'>
<h1>记住筛选的列（需放置在web服务器下访问才能有效果）</h1>
<table id="table"></table>
</div>
<script>
$(function(){
	$('#table').bootstrapTable({
		showColumns:true,	//显示 内容列下拉框
		cookie:true,
		cookieIdTable:'table2',
		cookieExpire:'2h',
		cookiePath:'/', 
		columns: [{
			field: 'id',
			title: 'Item ID'
		}, {
			field: 'name',
			title: 'Item Name'
		}, {
			field: 'price',
			title: 'Item Price'
		}],
		data: [{
			id: 1,
			name: 'Item 1',
			price: '$1'
		}, {
			id: 2,
			name: 'Item 2',
			price: '$2'
		}],
		

	});
	//$('#table').bootstrapTable('hideColumn', 'name');
});
</script>
</body>
</html>